﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace MaximServices.Model
{
    public class CreateMottoResultModel
    {
        public int errorCount
        {
            get
            {
                return errorList.Count;
            }
        }

        public List<int> errorList
        {
            get
            {
                List<int> tmp = new List<int>();
                for (int i = 0; i < DataList.Count; i++)
                {
                    if (DataList[i].isSuccess == false)
                        tmp.Add(i);
                }
                return tmp;
            }
        }

        public List<CreateMottoDataModel> DataList { get; set; }

        public CreateMottoResultModel()
        {
            DataList = new List<CreateMottoDataModel>();
        }
    }

    public class CreateMottoDataModel
    {
        public string auth { get; set; }
        public string content { get; set; }

        public string contentLite
        {
            get
            {
                return Regex.Replace(content, @"([^\u4e00-\u9fa5a-zA-z0-9\s].*?)", "");
            }
        }
        public bool isSuccess { get; set; }
    }

}
